//
//  Common.swift
//  WB25
//
//  Created by HM on 2017/6/29.
//  Copyright © 2017年 itheima. All rights reserved.
//
// 和OC的pch文件相似 -> 全局共享
import UIKit

// 屏幕的宽度和高度
let HMSCREENH = UIScreen.main.bounds.height
let HMSCREENW = UIScreen.main.bounds.width
// 通知名
// 切换根控制器通知名
let HMSWITCHROOTVIEWCONTROLLERNOTI = NSNotification.Name(rawValue: "HMSWITCHROOTVIEWCONTROLLERNOTI")
// 表情键盘需要的通知名
// 20个按钮
let HMEMOTICONBUTTONCLICKNOTI = NSNotification.Name(rawValue: "HMEMOTICONBUTTONCLICKNOTI")
// 删除按钮
let HMDELETEBUTTONCLICKNOTI = NSNotification.Name(rawValue: "HMDELETEBUTTONCLICKNOTI")

// 微博相关的信息
let HMAPPKEY = "1745410014"
let HMAPPSECRET = "668371adb24bde6f363735183934881f"
let HMREDIRECT_URI = "http://www.baidu.com"
// 微博账号及密码
let HMWBNAME = "rangyuan05788697@163.com"
let HMWBPASSWD = "bbb333"
//let HMWBNAME = "muqi70595723@163.com"
//let HMWBPASSWD = "bbb333"


// RGB颜色
func RGB(r: CGFloat, g: CGFloat, b: CGFloat, alpha: CGFloat = 1) -> UIColor{
    return UIColor(red: r/255, green: g/255, blue: b/255, alpha: alpha)
}

// 随机颜色
func randomColor() -> UIColor{
    // 随机数
    let r = CGFloat(arc4random()%256)
    let g = CGFloat(arc4random()%256)
    let b = CGFloat(arc4random()%256)
    return RGB(r: r, g: g, b: b)
}

// app中使用字体的大小

// 小号字体
let HMSmallFontSize: CGFloat = 10
// 普通字体
let HMNormalFontSize: CGFloat = 14
// 大号字体
let HMBigFontSize: CGFloat = 18

// 主题颜色
let HMThemeColor = UIColor.orange
